//
//  FlowLayout.m
//  320-CocoaPodsm
//
//  Created by user on 16/3/20.
//  Copyright © 2016年 MoreMoney. All rights reserved.
//

#import "FlowLayout.h"
#import "Header.h"

@implementation FlowLayout
- (void)prepareLayout
{
    [super prepareLayout];
    
    // 注册cell
    UINib *nib = [UINib nibWithNibName:@"XBCommunityCell" bundle:nil];
    [self.collectionView registerNib:nib forCellWithReuseIdentifier:collectionCellID];

    CGSize size = self.collectionView.bounds.size;
    // 设置FlowLayout
    self.itemSize = CGSizeMake(size.width, size.height);
    // 水平滚动
    self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    self.minimumInteritemSpacing = 0;
    self.minimumLineSpacing = 0;
    self.collectionView.pagingEnabled = YES;
}

@end
